﻿// See https://aka.ms/new-console-template for more information
using System;

namespace Array
{
    class Solution
    {
        const int INF = 0x3f3f3f3f;
        static void Main(string[] args)
        {
            int[] arr = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 };
            int max = -INF;
            int min = INF;
            int sum = 0;

            for (int i = 0; i < arr.Length; i++)
            {
                if (arr[i] > max)
                {
                    max = arr[i];
                }

                if (arr[i] < min)
                {
                    min = arr[i];
                }
                sum += arr[i];
            }

            double average = (double)sum / arr.Length;
            Console.WriteLine(max);
            Console.WriteLine(min);
            Console.WriteLine(average);
            Console.WriteLine(sum);
        }
    }

}
